<?xml version="1.0"?>
<jsp:root 	xmlns:jsp="http://java.sun.com/JSP/Page"
			xmlns:sql="http://java.sun.com/jsp/jstl/sql"
			xmlns:c="http://java.sun.com/jsp/jstl/core" 
			xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
			version="2.1">
	<jsp:directive.page contentType="text/html; charset=UTF-8" />
	<jsp:directive.page isELIgnored="false" />
	<jsp:output omit-xml-declaration="false"
		doctype-root-element="html"
		doctype-public="-//W3C//DTD XHTML 1.1//EN"
		doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd" /> 	
				
	<jsp:useBean id="userBean" class="es.albarregas.beans.UserBean" scope="session" />	
	<jsp:useBean id="productList" class="es.albarregas.beans.ProductListBean" scope="session" />
	
	
<!--[if lt IE 8]>      <html class="no-js lt-ie10 lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie10 lt-ie9"> <![endif]-->
<!--[if IE 9]>         <html class="no-js lt-ie10"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
  <head>
    <meta charset="ISO-8859-1" />
    <title>Ikex | Inicio</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="description" content="" />
    <meta name="author" content="Josu Becerra" />
    
    <!-- Favicon y Apple touch icons (botones para Ipad y Iphone) -->
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="images/apple-touch/144.png" ></link>
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="images/apple-touch/114.png" ></link>
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="images/apple-touch/72.png" ></link>
    <link rel="apple-touch-icon-precomposed" href="images/apple-touch/57.png" ></link>
    <link rel="shortcut icon" href="images/favicon.png" ></link>
    
    <!--  Google Fonts  -->
    <link href='http://fonts.googleapis.com/css?family=Roboto:500' rel='stylesheet' type='text/css'></link>
    
    <!-- Twitter Bootstrap; librería ventanas JQuery-->
    <link href="css/bootstrap.css" rel="stylesheet" ></link>
    <link href="css/responsive.css" rel="stylesheet" ></link>
    <!-- Slider Revolution -->
    <link rel="stylesheet" href="js/rs-plugin/css/settings.css" type="text/css" ></link>
    <!-- jQuery UI -->
    <link rel="stylesheet" href="js/jquery-ui-1.10.3/css/smoothness/jquery-ui-1.10.3.custom.min.css" type="text/css" ></link>
    <!-- PrettyPhoto -->
    <link rel="stylesheet" href="js/prettyphoto/css/prettyPhoto.css" type="text/css" ></link>
    <!-- main styles -->
     
    <link href="css/main.css" rel="stylesheet" ></link>
     
     <!-- JQuery -->
	<!-- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> -->
	<script type="text/javascript" src="js/jquery.min.js"><jsp:text /></script>

    <!-- Modernizr, librería que le dice al navegador cómo actuar si no soporta la funcionalidad de la página 
    <script src="js/modernizr.custom.56918.js"></script>    -->
 	
  	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  	 
  </head>

   
  <body>
  <div id="todo">
   
  	<!--  =====================  -->
    <!--  = Header - Cabecera =  -->
    <!--  =====================  -->  
    <c:choose>
    	<c:when test="${userLoggedIn == true}">
    		<jsp:include page="include/header-logged-in.jsp" />
    	</c:when>
    	<c:otherwise>
    		<jsp:include page="include/header.jsp" />
    	</c:otherwise>
    </c:choose>

	<c:set var="currentPage" value="index" scope="session"></c:set>
	
	<!--  ====================================================  -->
    <!--  = Main Menu / Menú Principal - Barra de Navegación =  -->
    <!--  ====================================================  -->
    <jsp:include page="include/menu.jsp" />

	<!--  ===========  -->
    <!--  = Slider  =  -->
    <!--  ===========  -->
	<jsp:include page="include/slider.jsp" />
	
	<!--  =========================================  -->
    <!--  = Main container - Contenedor principal =  -->
    <!--  =========================================  -->
    <div class="container">
	    <!--  =======================  -->
	    <!--  = Banner Tres Botones =  -->
	    <!--  =======================  -->
	    <jsp:include page="include/botones-promo.jsp" />
    
    	<!--  ========================  -->
        <!--  = Productos Destacados =  -->
        <!--  ========================  -->
    	<jsp:include page="include/destacados.jsp" />
    	
    	<!--  ========================  -->
        <!--  = Nuevos Productos  =  -->
        <!--  ========================  -->
    	<jsp:include page="include/novedades.jsp" />
    
    </div> <!-- container -->
    
    <!--  ========================  -->
    <!--  = Footer  =  -->
    <!--  ========================  -->
    <jsp:include page="include/footer.jsp" />
    
    
	
	<!--  ====================  -->
	<!--  = Ventanas modales =  -->
 	<!--  ====================  -->
	<jsp:include page="include/ventanas.jsp" />
	
	
	


	<!--  ==============  -->
    <!--  = JavaScript =  -->
    <!--  ==============  -->
	<jsp:include page="include/js.jsp" />
	
	<jsp:include page="include/external-js.jsp" />
	
	
	
	<!-- Si procede de un error de registro, abrimos la ventana modal de registro -->
	<c:if test="${registroKO == true }">
		<script type="text/javascript">
	    	//console.log("estoy dentro");
		    $(window).load(function(){
		        $('#registerModal').modal('show');
		    });
		</script>
	</c:if>
	
	<!-- Si procede de un error de login, abrimos la ventana modal de login -->
	<c:if test="${loginKO == true }">
		<script type="text/javascript">
		    $(window).load(function(){
		        $('#loginModal').modal('show');
		    });
		</script>
	</c:if>
	

	</div>
  </body>
</html>

 </jsp:root>   
    